//
//  ViewController.m
//  MoikitBle
//
//  Created by 张伯林 on 2017/10/24.
//  Copyright © 2017年 张伯林. All rights reserved.
//

#import "ViewController.h"
#import "MCupManager.h"
@interface ViewController ()<MCupManagerDelegate>
{
    MCupManager *manager;
}
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // 初始化MCupManager,参数为你已经申请到的Appkey和AppSercet
    manager = [[MCupManager alloc] initWithAppkey:@"ca9f6925191b4a1180d7aa2eb17d9199" Sercet:@"21c512f0"];
    
    // 设置委托
    manager.delegate = self;
}
-(void)discoverPeripherals:(NSMutableArray *)foundPeripherals{
    if (foundPeripherals) {
        NSLog(@"所有水杯信息:%@",foundPeripherals);
        [manager stopScanning];
    }
//    else{
//        [manager startScanning];
//    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
